//
//  NSObject+MGAdd.h
//  MGKit
//
//  Created by yideqiang on 2018/6/15.
//

#import <Foundation/Foundation.h>

@interface NSObject (MGAdd)

- (NSInteger)asInteger;

- (float)asFloat;

- (BOOL)asBool;

- (NSNumber *)asNSNumber;

- (NSString *)asNSString;

- (NSDate *)asNSDate;

- (NSData *)asNSData;

- (NSArray *)asNSArray;

- (NSMutableArray *)asNSMutableArray;

- (NSDictionary *)asNSDictionary;

- (NSMutableDictionary *)asNSMutableDictionary;

/*
 对象是否为空
 */
- (BOOL)isNotNull;

/**
 是否是NSDictionary类型
 */
- (BOOL)isDictionaryClass;

/**
 是否是NSArray类型
 */
- (BOOL)isArrayClass;

/// 主线程执行block
+ (void)mgc_asyncMainExecuteBlock:(void (^)(void))block;

@end
